package com.mybatisplus.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
/*
使用AR，要求实体类需要继承mp中的model
model中提供了对数据库的crud操作
 */
public class Dept extends Model<Dept> {
    //定义属性 和表列名一致
//    @TableId(value = "id",type = IdType.AUTO)
//    private Integer id;
//    @TableId(value = "id",type = IdType.ASSIGN_ID)
//    private Long id;
    @TableId(value = "id",type = IdType.ASSIGN_UUID)
    private String id;
    private String name;
    private String mobile;
    private Integer manger;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public Integer getManger() {
        return manger;
    }

    public void setManger(Integer manger) {
        this.manger = manger;
    }

    @Override
    public String toString() {
        return "Dept{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", mobile='" + mobile + '\'' +
                ", manger=" + manger +
                '}';
    }
}
